package WuHanTrainStation;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

//小界面类
public class Use {
    public void use() throws IOException, ClassNotFoundException {
        Use use = new Use();
        BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));
        firstAdministratorMenu firstAdministratorMenu = new firstAdministratorMenu();
        System.out.println("请选择你要进行的操作：");
        System.out.println("1.返回主菜单");
        System.out.println("2.结束所有操作，退出程序");
        switch (bufferedReader.readLine()) {
            case "1":
                firstAdministratorMenu.administratorUtility();
                break;
            case "2":
                System.exit(0);
            default:
                System.out.println("功能号不存在！请正确输入功能号！");
                use.use();
                break;
        }
    }

    public void utilityUse() throws IOException, ClassNotFoundException {
        BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));
        firstAdministratorMenu firstAdministratorMenu = new firstAdministratorMenu();
        Use use = new Use();
        System.out.println("请选择你要进行的操作：");
        System.out.println("1.继续本步");
        System.out.println("2.结束所有操作，退出程序");
        switch (bufferedReader.readLine()) {
            case "1":
                break;
            case "2":
                System.exit(0);
            default:
                System.out.println("功能号不存在！请正确输入功能号！");
                use.utilityUse();
        }
    }

}